<?php
namespace Unl\HomologacionBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use FOS\UserBundle\Form\Type\RegistrationFormType as BaseType;

class RegistrationFormType extends BaseType
{
    public function buildForm(FormBuilder $builder, array $options)     {
        parent::buildForm($builder, $options);
        //$builder->add('persona');
      
        $builder
                ->add('roles', 'choice', array('label' => 'Rol', 'required' => true,
                      'choices' => array( 1 => 'ROLE_ESTUDIANTE',
                                          2 => 'ROLE_SECRETARIA',
                                          3 => 'ROLE_DOCENTE',
                                          4 => 'ROLE_ADMINISTRADOR'),
                                          'multiple' => true))
                ->add('persona',new PersonaType());  
                       

    }

    public function getName() {
        return 'userRegistration';
    }
    
//    public function getDefaultOptions(array $options)
//    {
//        return array('data_class' => 'Unl\HomologacionBundle\Entity\Usuario',);
//    }
}